# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=uglify-js
pkgver=3.10.0
pkgrel=0
pkgdesc="JavaScript parser, mangler/compressor and beautifier toolkit"
url="http://lisperator.net/uglifyjs"
arch="noarch !mips !mips64" # blocked by nodejs
license="BSD-2-Clause"
depends="nodejs"
makedepends="npm"
source="https://registry.npmjs.org/uglify-js/-/uglify-js-$pkgver.tgz"
options="!check"
builddir="$srcdir/package"

unpack() {
	# skipping unpacking, installing archive directly
	verify
}

package() {
	npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/uglify-js-$pkgver.tgz"
	chown -R root: "$pkgdir" # npm installs as build user
}

sha512sums="12c8f91c6e56032acb21d614ef867725d1b63f1748bacbe3e8858732d972112c5cee4703cfbcd89588e99d2a249f551ba55d1dfd05fd7da9fb82408d77ff4140  uglify-js-3.10.0.tgz"
